<template>
<h2>登录</h2>
<table>

    <tr>
        <td>用户账号</td>
        <td>
        <input type="text" id="Yname" >
        </td>
    </tr>
    <tr>
        <td>用户密码</td>
        <td>
        <input type="text" id="Ypwd" >
        </td>
    </tr>
        <tr>
        <td></td>
        <td>
        <button type="" @click="Login">登录</button>
        </td>
    </tr>
</table>
</template>
<script setup lang="ts">
const log=([
    {
Yname:"admin",
 Ypwd:"admin123"
    }
   
])
function Login() {
    
    alert("用户名:"+log[0].Yname+"密码："+log[0].Ypwd)
}
</script>